package com.imooc.dianping.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.imooc.dianping.model.Category;
import com.imooc.dianping.model.Seller;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface CategoryMapper extends BaseMapper<Category> {

    @Select("select * from category where name=#{name}")
    Category selectByName(@Param("name") String name);

    @Select("select * from category order by id desc")
    Page<Category> selectPageOrderById(Page<Category> page);
}
